package com.hightrast.service.api.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.hightrast.service.api.baseEntity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author hx
 * @since 2025-01-24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="RastOrders对象", description="订单表")
public class RastOrders extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "顾客邮箱")
    private String email;

    @ApiModelProperty(value = "订单关闭时间")
    private LocalDateTime closedAt;

    @ApiModelProperty(value = "订单创建时间")
    private LocalDateTime createdAt;

    @ApiModelProperty(value = "订单最后更新时间")
    private LocalDateTime updatedAt;

    @ApiModelProperty(value = "订单编号")
    private Integer number;

    @ApiModelProperty(value = "订单备注")
    private String note;

    @ApiModelProperty(value = "订单token")
    private String token;

    @ApiModelProperty(value = "支付网关")
    private String gateway;

    @ApiModelProperty(value = "是否为测试订单")
    private Integer test;

    @ApiModelProperty(value = "订单总金额")
    private String totalPrice;

    @ApiModelProperty(value = "订单小计")
    private String subtotalPrice;

    @ApiModelProperty(value = "订单总重量")
    private String totalWeight;

    @ApiModelProperty(value = "税费总额")
    private String totalTax;

    @ApiModelProperty(value = "是否包含税费")
    private Integer taxesIncluded;

    @ApiModelProperty(value = "货币")
    private String currency;

    @ApiModelProperty(value = "财务状态")
    private String financialStatus;

    @ApiModelProperty(value = "是否确认")
    private Integer confirmed;

    @ApiModelProperty(value = "订单总折扣")
    private String totalDiscounts;

    @ApiModelProperty(value = "商品总金额")
    private String totalLineItemsPrice;

    @ApiModelProperty(value = "是否接受营销")
    private Integer buyerAcceptsMarketing;

    @ApiModelProperty(value = "订单名称")
    private String name;

    @ApiModelProperty(value = "订单编号")
    private String orderNumber;

    @ApiModelProperty(value = "订单来源")
    private String sourceName;

    @ApiModelProperty(value = "订单状态链接")
    private String orderStatusUrl;

    @ApiModelProperty(value = "呈现的货币")
    private String presentmentCurrency;

    @ApiModelProperty(value = "GraphQL API ID")
    private String adminGraphqlApiId;

    @ApiModelProperty(value = "当前总金额")
    private String currentTotalPrice;

    @ApiModelProperty(value = "未支付总额")
    private String totalOutstanding;

    @ApiModelProperty(value = "当前小计")
    private String currentSubtotalPrice;

    @ApiModelProperty(value = "当前税费")
    private String currentTotalTax;

    @ApiModelProperty(value = "当前折扣")
    private String currentTotalDiscounts;

    @ApiModelProperty(value = "发货状态")
    private String fulfillmentStatus;

    @ApiModelProperty(value = "商品项")
    @TableField(exist = false)
    List<RastOrderProductItems> lineItems = new ArrayList<>();

    @ApiModelProperty(value = "退款商品项")
    @TableField(exist = false)
    List<RastOrderProductRefundItems> refundItems = new ArrayList<>();
}
